﻿using Coldairarrow.Entity.AM;
using Coldairarrow.Util;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business.AM
{
    public partial interface IAM_AssetCheckBusiness
    {
        Task<PageResult<AM_AssetCheck>> GetDataListAsync(PageInput<ConditionDTO> input);
        Task<AM_AssetCheck> GetTheDataAsync(string id);
        Task AddDataAsync(AM_AssetCheck data);
        Task UpdateDataAsync(AM_AssetCheck data);
        Task DeleteDataAsync(List<string> ids);

        #region  PDA资产盘点

        /// <summary>
        /// 获取资产信息
        /// </summary>
        /// <param name="AssetQrCode">资产卡片二维码</param>
        /// <param name="AssetCheckQrCode">盘点单二维码</param>
        /// <returns></returns>
        Task<AM_AssetItemDTO> GetAssetItemDataAsync(string AssetQrCode, string AssetCheckQrCode);

        /// <summary>
        /// PDA盘点保存
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task InsertAssetCheckDataAsync(AssetFirmOfferDTO data);

        /// <summary>
        /// 获取实际盘点明细
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<AM_AssetFirmOfferDTO>> GetAssetFirmOfferListAsync(PageInput<AssetFirmOfferConditionDTO> input);

        /// <summary>
        /// 移除实际盘点资产信息
        /// </summary>
        /// <param name="Id">实际盘点明细Id</param>
        /// <returns></returns>
        Task DeleteAssetFirmOfferDataAsync(string Id);

        /// <summary>
        /// 提交资产盘点
        /// </summary>
        /// <param name="AssetCheckQrCode">盘点单二维码</param>
        /// <returns></returns>
        Task SubmitAssetFirmOfferAsync(string AssetCheckQrCode);

        #endregion

        #region PDA资产调拨

        /// <summary>
        /// 调拨获取资产信息
        /// </summary>
        /// <param name="AssetQrCode">资产卡片二维码</param>
        /// <returns></returns>
        Task<AM_AssetItemDTO> GetAllocationAssetItemDataAsync(string AssetQrCode);

        /// <summary>
        /// 资产调拨保存
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task SaveMotionDataAsync(AllocationAssetDTO data);

        #endregion

        #region PDA资产报废

        /// <summary>
        /// 资产报废
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task SaveAssetScrapAsync(AssetScrapDTO data);

        #endregion

        #region PDA资产处置

        /// <summary>
        /// 资产报废
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task SaveAssetDisposalAsync(AssetScrapDTO data);

        #endregion
    }

    #region  PDA资产盘点DTO

    /// <summary>
    /// 资产实际盘点chaunzhi
    /// </summary>
    public class AssetFirmOfferDTO
    {
        /// <summary>
        /// 资产盘点二维码
        /// </summary>
        public string AssetCheckQrCode { get; set; }

        /// <summary>
        /// 资产二维码
        /// </summary>
        public string AssetQrCode { get; set; }

    }

    /// <summary>
    /// 获取实际盘点明细
    /// </summary>
    public class AM_AssetFirmOfferDTO : AM_AssetFirmOffer
    {
        /// <summary>
        /// 资产分类id
        /// </summary>
        public int? AssetCategoryId { get; set; }

        /// <summary>
        /// 资产分类名称
        /// </summary>
        public string AssetCategoryName { get; set; }

        /// <summary>
        /// 位置
        /// </summary>
        public string AssetPosition { get; set; }

        /// <summary>
        /// 位置
        /// </summary>
        public string AssetPositionName { get; set; }

        /// <summary>
        /// 规格
        /// </summary>
        public string AssetSpec { get; set; }

        /// <summary>
        /// 部门
        /// </summary>
        public string DeptName { get; set; }

    }

    public class AssetFirmOfferConditionDTO
    {
        public string Keyword { get; set; }
        public string ProjectName { get; set; }

        /// <summary>
        /// 盘点单二维码
        /// </summary>
        public string AssetCheckQrCode { get; set; }
    }

    /// <summary>
    /// 获取资产信息
    /// </summary>
    public class AM_AssetItemDTO : AM_AssetItem
    {
        /// <summary>
        /// 资产分类名称
        /// </summary>
        public string AssetCategoryName { get; set; }

        /// <summary>
        /// 位置
        /// </summary>
        public string AssetPositionName { get; set; }

        /// <summary>
        /// 部门
        /// </summary>
        public string DeptName { get; set; }

    }

    #endregion

    #region PDA资产调拨DTO

    public class AllocationAssetDTO
    {
        /// <summary>
        /// 调入部门
        /// </summary>
        public string DeptId { get; set; }

        /// <summary>
        /// 调拨明细
        /// </summary>
        public List<AM_AssetItemDTO> AssetItemList { get; set; }

    }

    #endregion

    #region PDA资产报废
    public class AssetScrapDTO
    {
        /// <summary>
        /// 报废原因
        /// </summary>
        public string ScrapRemarks { get; set; }

        /// <summary>
        /// 调拨明细
        /// </summary>
        public List<AM_AssetItemDTO> AssetItemList { get; set; }

    }

    #endregion

}